--- redirect_from: - "/doppler" interact_link: content/Doppler.ipynb kernel_name: python3 kernel_path: content has_widgets: false title: |- The Doppler Effect pagenum: 3 prev_page: url: /rotation.html next_page: url: /schrodinger2.html suffix: .ipynb search: doppler effect source moving lets audio our waves wavefronts being looking start considering move velocity relativistic both understanding relativity consider speed away reference frame looks want explore using graphics possibly embedding ambulance cool classical im not sure file anything official sorced www soundarchive online repeatedly honking car passing quickly mp free download noises activity test able embed files maybe record own something adding animations soundwave below plot crests emmitted constant outwards need combine special understand works purely relitavistic case wave traveling light fast same any direction observer left c above example relitivistic employing set circular investigate further affects shape simple comment: "***PROGRAMMATICALLY GENERATED, DO NOT EDIT. SEE ORIGINAL FILES IN /content***" ---
The Doppler Effect

The Doppler Effect

%load_ext autoreload
%autoreload 2
from modules import doppler as dp

We want to explore the doppler effect using graphics and possibly sound (embedding a moving ambulance sound would be cool).

Classical Doppler Effect

import IPython
IPython.display.Audio("data/car_honking.mp3")

I'm not sure if we can use this file for anything official, sorced from https://www.soundarchive.online/repeatedly-honking-car-passing-by-quickly-2-1-10007-mp3-audio-sound-free-download-noises-activity/

This is more of a test of being able to embed audio files. Maybe we could record our own audio or something?

now for looking at adding some animations.

Let's start by considering a source of a soundwave. Below we will plot the crests of waves being emmitted by a source. The waves will move at a constant velocity outwards from the source.

%%capture
ani = dp.animate_soundwaves(200)
ani
%%capture
ani = dp.animate_soundwaves_moving_source(source_history=True)
ani
%%capture
animated = dp.animate_transverse_moving_source()
animated

Relativistic Doppler Effect

We need to combine both our understanding of what the doppler effect is with our understanding of special relativity to understand how the relativistic doppler effect works. Let's start by considering the purely relitavistic case. To do this we consider a wave traveling the speed of light away from a fast moving source.

In the reference frame of the source, the waves move away at the same speed in any direction. In this reference frame there is no doppler effect.

%%capture
ani = dp.full_doppler(v=0)
ani

Let's consider what this looks like to an observer moving to the left at 0.75c.

%%capture
v_wave = 3e8
ani = dp.full_doppler(v = 0.75*v_wave, v_wave = v_wave, N =200, classical=False, relativistic=True)
ani

Above is an example of what relitivistic doppler effect looks like, employing both relativity and the doppler effect on a set of circular wavefronts. We can investigate this further by looking at how the velocity affects the shape of the wavefronts. To make it simple, let's ignore they axis and track the wavefronts moving along the xaxis over time for different velocities.

dp._transition_plot(freq = 20, v = 0.75*3e8, N=200)
%%capture
ani = dp.spacetime_plot()
ani # This plot seems confusing to other people when I show it to them but I'm not sure how I can inprove it